package pac.Labor;
import java.util.Observable;
import java.util.Observer;
public class LaborMember implements Observer {
    protected String name;

    public LaborMember(String name)
    {
        this.name = name;
    }

    protected void work(String place)
    {
        System.out.println(name + "正在" + place + "打扫卫生.");
    }

    @Override
    public void update(Observable o, Object arg) {
        LaborTask arg1 = (LaborTask)arg;
        this.work(arg1.place);
    }
}
